import { Code, Avatar, DateTime, Digdit, Entity, Link, PrimaryUuid, RichText, Int, CreateDate, UpdateDate, Money } from "@sker/core";
import { Index } from "typeorm";


@Entity({ name: 'wb_event_new' })
export class WbEventNew {
    @PrimaryUuid()
    id: string;
    @Code({ unique: true })
    new_id: string;
    @Digdit({ default: 0 })
    share: number;
    @Digdit({ default: 0 })
    comment: number;
    @Digdit({ default: 0 })
    good: number;
    @Link({ default: '' })
    link: string;
    @Code({ default: '' })
    time_str: Date;
    @DateTime({ nullable: true })
    time: Date;
    @Avatar({ default: '' })
    avatar: string;
    @Code({ default: '' })
    from: string;
    @Code({ default: '' })
    author: string;
    @Link({ default: '' })
    author_url: string;
    @RichText()
    content: string;
    @Link({ default: '' })
    platform_url: string;
    @Code({ default: '' })
    platform: string;
    @Code({ default: '' })
    uid: string;
    @Int()
    @Index('WB_EVENT_NEW_EVENT_ID')
    event_id: number;
    @CreateDate()
    create_date: Date;
    @UpdateDate()
    update_date: Date;
    @Code({ default: '' })
    keyword: string;
    @Digdit({ default: 0 })
    version: number;
    @Money({ default: 0 })
    new_negavite: number;
    @Money({ default: 0 })
    comment_negavite: number;
    @Money({ default: 0 })
    share_negavite: number;
}